.class Lcom/melesta/engine/EngineActivity$23;
.super Ljava/lang/Object;
.source "EngineActivity.java"

# interfaces
.implements Lcom/sponsorpay/sdk/android/publisher/currency/SPCurrencyServerListener;


# annotations
.annotation system Ldalvik/annotation/EnclosingMethod;
    value = Lcom/melesta/engine/EngineActivity;->sponsorPayRequestCoins()V
.end annotation

.annotation system Ldalvik/annotation/InnerClass;
    accessFlags = 0x0
    name = null
.end annotation


# instance fields
.field final synthetic this$0:Lcom/melesta/engine/EngineActivity;

.field final synthetic val$usedTransactionId:Ljava/lang/String;


# direct methods
.method constructor <init>(Lcom/melesta/engine/EngineActivity;Ljava/lang/String;)V
    .locals 0
    .parameter
    .parameter

    .prologue
    .line 2155
    iput-object p1, p0, Lcom/melesta/engine/EngineActivity$23;->this$0:Lcom/melesta/engine/EngineActivity;

    iput-object p2, p0, Lcom/melesta/engine/EngineActivity$23;->val$usedTransactionId:Ljava/lang/String;

    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    return-void
.end method


# virtual methods
.method public onSPCurrencyDeltaReceived(Lcom/sponsorpay/sdk/android/publisher/currency/CurrencyServerDeltaOfCoinsResponse;)V
    .locals 6
    .parameter "response"

    .prologue
    .line 2166
    const-string v0, "Response From Currency Server"

    const-string v1, "Delta of Coins: %s\n\nUsed Latest Transaction ID: %s\n\nReturned Latest Transaction ID: %s\n\n"

    const/4 v2, 0x3

    new-array v2, v2, [Ljava/lang/Object;

    const/4 v3, 0x0

    invoke-virtual {p1}, Lcom/sponsorpay/sdk/android/publisher/currency/CurrencyServerDeltaOfCoinsResponse;->getDeltaOfCoins()D

    move-result-wide v4

    invoke-static {v4, v5}, Ljava/lang/Double;->valueOf(D)Ljava/lang/Double;

    move-result-object v4

    aput-object v4, v2, v3

    const/4 v3, 0x1

    iget-object v4, p0, Lcom/melesta/engine/EngineActivity$23;->val$usedTransactionId:Ljava/lang/String;

    aput-object v4, v2, v3

    const/4 v3, 0x2

    invoke-virtual {p1}, Lcom/sponsorpay/sdk/android/publisher/currency/CurrencyServerDeltaOfCoinsResponse;->getLatestTransactionId()Ljava/lang/String;

    move-result-object v4

    aput-object v4, v2, v3

    invoke-static {v1, v2}, Ljava/lang/String;->format(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v1

    invoke-static {v0, v1}, Lcom/melesta/engine/Log;->d(Ljava/lang/String;Ljava/lang/String;)V

    .line 2170
    iget-object v0, p0, Lcom/melesta/engine/EngineActivity$23;->this$0:Lcom/melesta/engine/EngineActivity;

    invoke-virtual {p1}, Lcom/sponsorpay/sdk/android/publisher/currency/CurrencyServerDeltaOfCoinsResponse;->getDeltaOfCoins()D

    move-result-wide v1

    #calls: Lcom/melesta/engine/EngineActivity;->sponsorPaySaveCoins(D)V
    invoke-static {v0, v1, v2}, Lcom/melesta/engine/EngineActivity;->access$1400(Lcom/melesta/engine/EngineActivity;D)V

    .line 2171
    return-void
.end method

.method public onSPCurrencyServerError(Lcom/sponsorpay/sdk/android/publisher/currency/CurrencyServerAbstractResponse;)V
    .locals 5
    .parameter "response"

    .prologue
    .line 2159
    const-string v0, "Response or Request Error"

    const-string v1, "%s\n%s\n%s\n"

    const/4 v2, 0x3

    new-array v2, v2, [Ljava/lang/Object;

    const/4 v3, 0x0

    invoke-virtual {p1}, Lcom/sponsorpay/sdk/android/publisher/currency/CurrencyServerAbstractResponse;->getErrorType()Lcom/sponsorpay/sdk/android/publisher/AbstractResponse$RequestErrorType;

    move-result-object v4

    aput-object v4, v2, v3

    const/4 v3, 0x1

    invoke-virtual {p1}, Lcom/sponsorpay/sdk/android/publisher/currency/CurrencyServerAbstractResponse;->getErrorCode()Ljava/lang/String;

    move-result-object v4

    aput-object v4, v2, v3

    const/4 v3, 0x2

    invoke-virtual {p1}, Lcom/sponsorpay/sdk/android/publisher/currency/CurrencyServerAbstractResponse;->getErrorMessage()Ljava/lang/String;

    move-result-object v4

    aput-object v4, v2, v3

    invoke-static {v1, v2}, Ljava/lang/String;->format(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v1

    invoke-static {v0, v1}, Lcom/melesta/engine/Log;->d(Ljava/lang/String;Ljava/lang/String;)V

    .line 2162
    return-void
.end method
